//
//  AppDelegate.swift
//  LCYWeiBo
//
//  Created by 李长友 on 16/8/30.
//  Copyright © 2016年 app. All rights reserved.
//

import UIKit
import SVProgressHUD

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        
        UITabBar.appearance().tintColor = UIColor.orangeColor()
        UINavigationBar.appearance().tintColor = UIColor.orangeColor()
        
        window = UIWindow(frame: UIScreen.mainScreen().bounds)
        window?.rootViewController = UserViewModel.shareInstance.isLogin ? WelcomeViewController() : MainViewController()
        window?.makeKeyAndVisible()

        return true
    }
}

// MARK: - 自定义Log
func debugLog<T>(messsage : T, file : String = #file, funcName : String = #function, lineNum : Int = #line) {

    #if DEBUG
        
        let fileName = (file as NSString).lastPathComponent
        
        print("\(fileName)---\(lineNum)---\(messsage)")
        
    #endif
}